package com.gmp.material.domain;

import java.time.LocalDate;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.gmp.common.annotation.Excel;
import com.gmp.common.core.domain.BaseEntity;

/**
 * 物料记录管理对象 material_receipt_record
 * 
 * @author Koi
 * @date 2025-07-26
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(resultMap = "com.gmp.material.mapper.MaterialReceiptRecordMapper.MaterialReceiptRecordResult")
public class MaterialReceiptRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID（如UUID） */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /** 收货日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "收货日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiptDate;

    /** 物料代码，唯一标识物料 */
    @Excel(name = "物料代码，唯一标识物料")
    private String materialCode;

    /** 收货编号，每次收货的唯一编号 */
    @Excel(name = "收货编号，每次收货的唯一编号")
    private String receiptNumber;

    /** 物料名称 */
    @Excel(name = "物料名称")
    private String materialName;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String supplier;

    /** 生产厂家 */
    @Excel(name = "生产厂家")
    private String manufacturer;

    /** 厂家批号 */
    @Excel(name = "厂家批号")
    private String manufacturerBatchNumber;

    /** 生产日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /** 保质期/失效日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保质期/失效日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expirationDate;

    /** 储存条件，如冷藏、常温等 */
    @Excel(name = "储存条件，如冷藏、常温等")
    private String storageCondition;

    /** 物料规格 */
    @Excel(name = "物料规格")
    private String specification;

    /** 收货总数量 */
    @Excel(name = "收货总数量")
    private String receivedQuantity;

    /** 拒收数量 */
    @Excel(name = "拒收数量")
    private String rejectedQuantity;

    /** 合格数量（收货数量-拒收数量） */
    @Excel(name = "合格数量", readConverterExp = "收=货数量-拒收数量")
    private String qualifiedQuantity;

    /** 收货状态：已请检1/核验通过3 */
    @Excel(name = "收货状态：已请检1/核验通过2/3不通过")
    private Integer receiptStatus;

    /** 收货人姓名 */
    @Excel(name = "收货人姓名")
    private String receiver;

    /** 备注信息 */
    @Excel(name = "备注信息")
    private String remarks;

    /** 逻辑删除标记：0-未删除，1-已删除 */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer isDelete;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }

    public void setReceiptDate(Date receiptDate) 
    {
        this.receiptDate = receiptDate;
    }

    public Date getReceiptDate() 
    {
        return receiptDate;
    }

    public void setMaterialCode(String materialCode) 
    {
        this.materialCode = materialCode;
    }

    public String getMaterialCode() 
    {
        return materialCode;
    }

    public void setReceiptNumber(String receiptNumber) 
    {
        this.receiptNumber = receiptNumber;
    }

    public String getReceiptNumber() 
    {
        return receiptNumber;
    }

    public void setMaterialName(String materialName) 
    {
        this.materialName = materialName;
    }

    public String getMaterialName() 
    {
        return materialName;
    }

    public void setSupplier(String supplier) 
    {
        this.supplier = supplier;
    }

    public String getSupplier() 
    {
        return supplier;
    }

    public void setManufacturer(String manufacturer) 
    {
        this.manufacturer = manufacturer;
    }

    public String getManufacturer() 
    {
        return manufacturer;
    }

    public void setManufacturerBatchNumber(String manufacturerBatchNumber) 
    {
        this.manufacturerBatchNumber = manufacturerBatchNumber;
    }

    public String getManufacturerBatchNumber() 
    {
        return manufacturerBatchNumber;
    }

    public void setProductionDate(Date productionDate) 
    {
        this.productionDate = productionDate;
    }

    public Date getProductionDate() 
    {
        return productionDate;
    }

    public void setExpirationDate(Date expirationDate) 
    {
        this.expirationDate = expirationDate;
    }

    public Date getExpirationDate() 
    {
        return expirationDate;
    }

    public void setStorageCondition(String storageCondition) 
    {
        this.storageCondition = storageCondition;
    }

    public String getStorageCondition() 
    {
        return storageCondition;
    }

    public void setSpecification(String specification) 
    {
        this.specification = specification;
    }

    public String getSpecification() 
    {
        return specification;
    }

    public void setReceivedQuantity(String receivedQuantity) 
    {
        this.receivedQuantity = receivedQuantity;
    }

    public String getReceivedQuantity() 
    {
        return receivedQuantity;
    }

    public void setRejectedQuantity(String rejectedQuantity) 
    {
        this.rejectedQuantity = rejectedQuantity;
    }

    public String getRejectedQuantity() 
    {
        return rejectedQuantity;
    }

    public void setQualifiedQuantity(String qualifiedQuantity) 
    {
        this.qualifiedQuantity = qualifiedQuantity;
    }

    public String getQualifiedQuantity() 
    {
        return qualifiedQuantity;
    }

    public void setReceiptStatus(Integer receiptStatus) 
    {
        this.receiptStatus = receiptStatus;
    }

    public Integer getReceiptStatus() 
    {
        return receiptStatus;
    }

    public void setReceiver(String receiver) 
    {
        this.receiver = receiver;
    }

    public String getReceiver() 
    {
        return receiver;
    }

    public void setRemarks(String remarks) 
    {
        this.remarks = remarks;
    }

    public String getRemarks() 
    {
        return remarks;
    }

    public void setIsDelete(Integer isDelete) 
    {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete() 
    {
        return isDelete;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("receiptDate", getReceiptDate())
            .append("materialCode", getMaterialCode())
            .append("receiptNumber", getReceiptNumber())
            .append("materialName", getMaterialName())
            .append("supplier", getSupplier())
            .append("manufacturer", getManufacturer())
            .append("manufacturerBatchNumber", getManufacturerBatchNumber())
            .append("productionDate", getProductionDate())
            .append("expirationDate", getExpirationDate())
            .append("storageCondition", getStorageCondition())
            .append("specification", getSpecification())
            .append("receivedQuantity", getReceivedQuantity())
            .append("rejectedQuantity", getRejectedQuantity())
            .append("qualifiedQuantity", getQualifiedQuantity())
            .append("receiptStatus", getReceiptStatus())
            .append("receiver", getReceiver())
            .append("remarks", getRemarks())
            .append("isDelete", getIsDelete())
            .toString();
    }
}
